<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/8/16
  Time: 10:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    #tb{
        margin: 0px auto;
    }
</style>
<script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js"></script>

<script>
    $(function () {
     $(".cont:odd").css("background","lightgreen");  //even代表偶数行，odd代表奇数行
    })
</script>
<body>
<table id="tb" style="width: 500px">
    <caption><h2>空气质量监测信息库</h2></caption>
    <tr>
        <td colspan="6" align="right">
            <a href="toAddAir.do">添加空气质量信息</a>
        </td>
    </tr>
    <tr style="background:lightblue">
        <th>序号</th>
        <th>区域</th>
        <th>监测时间</th>
        <th>PM10数据</th>
        <th>PM2.5数据</th>
        <th>监测站</th>
    </tr>
    <c:forEach items="${list}" var="a">
        <tr class="cont">
            <td>${a.id}</td>
            <td>${a.district.name}</td>
            <td>${a.monitorTime}</td>
            <td>${a.pmten}</td>
            <td>${a.pmtwo}</td>
            <td>${a.monitoringStation}</td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="6" align="center">
            <a href="getAirByPage.do?currPage=${currPage-1}">上一页</a>|
            <a href="getAirByPage.do?currPage=${currPage+1}">下一页</a>
        </td>
    </tr>
</table>



</body>
</html>
